<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SystemSharp: TypeConversions.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">SystemSharp
   &#160;<span id="projectnumber">0.3</span>
   </div>
   <div id="projectbrief">A system-level modeling framework for designing real-time embedded systems</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_type_conversions_8cs_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Events</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TypeConversions.cs</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_type_conversions_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">using</span> System.Collections.Generic;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">using</span> System.Diagnostics.Contracts;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">using</span> System.Linq;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">using</span> System.Reflection;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">using</span> System.Runtime.CompilerServices;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">using</span> System.Runtime.InteropServices;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">using</span> System.Text;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">using</span> SystemSharp.DataTypes;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">using</span> SystemSharp.Meta;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span>SystemSharp.Common</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html">   33</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class </span><a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html">TypeConversions</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae0828f2f0a646f89f0cbc672d875e36a">   42</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae0828f2f0a646f89f0cbc672d875e36a">ToDouble</a>(<span class="keywordtype">object</span> v)</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(v != null, <span class="stringliteral">&quot;v&quot;</span>);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            <span class="keywordflow">return</span> (<span class="keywordtype">double</span>)ConvertValue(v, typeof(<span class="keywordtype">double</span>));</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a96f464993cf1d01eb0118ad34a65d266">   55</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">long</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a96f464993cf1d01eb0118ad34a65d266">ToLong</a>(<span class="keywordtype">object</span> v)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(v != null, <span class="stringliteral">&quot;v&quot;</span>);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            <span class="keywordflow">return</span> (<span class="keywordtype">long</span>)ConvertValue(v, typeof(<span class="keywordtype">long</span>));</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7ed7e6044e799f6117334f820f376e91">   68</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> ulong <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7ed7e6044e799f6117334f820f376e91">ToULong</a>(<span class="keywordtype">object</span> v)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(v != null, <span class="stringliteral">&quot;v&quot;</span>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            <span class="keywordflow">return</span> (ulong)ConvertValue(v, typeof(ulong));</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a2079e7c2e35681455b8a7bae2718a2d7">   83</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a2079e7c2e35681455b8a7bae2718a2d7">ConvertToEnum</a>(<span class="keywordtype">long</span> src, Type dstType)</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            Contract.Requires&lt;ArgumentException&gt;(dstType.IsEnum, <span class="stringliteral">&quot;Destination type is not an enum type&quot;</span>);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            Array enumValues = dstType.GetEnumValues();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            FieldInfo[] fields = dstType.GetFields(BindingFlags.Instance | BindingFlags.Public);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            FieldInfo valueField = fields[0];</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            <span class="keywordtype">object</span> conv = null;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            <span class="keywordflow">foreach</span> (<span class="keywordtype">object</span> enumValue <span class="keywordflow">in</span> enumValues)</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordtype">long</span> lval = ToLong(valueField.GetValue(enumValue));</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                <span class="keywordflow">if</span> (lval == src)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                    conv = enumValue;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <span class="keywordflow">if</span> (conv == null)</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentOutOfRangeException(<span class="stringliteral">&quot;No matching enum value&quot;</span>);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            <span class="keywordflow">return</span> conv;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a5eea9d1e5789cf038f95a6ff54fe955b">  113</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a5eea9d1e5789cf038f95a6ff54fe955b">ConvertLong</a>(<span class="keywordtype">long</span> src, Type dstType)</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">bool</span>)))</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                <span class="keywordflow">return</span> src != 0 ? <span class="keyword">true</span> : <span class="keyword">false</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(sbyte)))</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                <span class="keywordflow">return</span> (sbyte)src;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(byte)))</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                <span class="keywordflow">return</span> (byte)src;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">char</span>)))</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">char</span>)src;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">short</span>)))</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)src;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ushort)))</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                <span class="keywordflow">return</span> (ushort)src;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">int</span>)))</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)src;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(uint)))</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                <span class="keywordflow">return</span> (uint)src;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">long</span>)))</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                <span class="keywordflow">return</span> src;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ulong)))</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                <span class="keywordflow">return</span> (ulong)src;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">double</span>)))</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">double</span>)src;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">float</span>)))</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">float</span>)src;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.IsEnum)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;                <span class="keywordflow">return</span> ConvertToEnum(src, dstType);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">object</span>)))</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                <span class="keywordflow">return</span> src;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException(<span class="keywordtype">string</span>.Format(<span class="stringliteral">&quot;Don&#39;t know how to convert &#39;long&#39; value to {0}&quot;</span>, dstType));</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        }</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#adbf3a2c45456ea98ed2e0c59e9c2319b">  156</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#adbf3a2c45456ea98ed2e0c59e9c2319b">ConvertLong</a>(<span class="keywordtype">long</span> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)))</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8948bc0b3b8574c7dff7c8d505dd33f3">FromLong</a>(src, <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)))</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a2f48b59cf83808aa61c850ac6bebb54b">FromBigInt</a>(<span class="keyword">new</span> System.Numerics.BigInteger(src), UFix.GetFormat(dstType).IntWidth);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)))</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#af3667451cdb9829237ed5c778ead1fb6">FromSigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8948bc0b3b8574c7dff7c8d505dd33f3">FromLong</a>(src, <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).IntWidth), <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).FracWidth);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>)))</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#ab2cdf4140e28b36845f79bf7035d7ee9">FromLong</a>(src, <a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#a6be9a3f726a9f003647cc7a8c77a0af4">GetLength</a>(dstType));</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                <span class="keywordflow">return</span> ConvertLong(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31b65e4aa26a131e580684c949503d1f">  178</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31b65e4aa26a131e580684c949503d1f">ConvertULong</a>(ulong src, Type dstType)</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(sbyte)))</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                <span class="keywordflow">return</span> (sbyte)src;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(byte)))</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                <span class="keywordflow">return</span> (byte)src;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">short</span>)))</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)src;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ushort)))</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                <span class="keywordflow">return</span> (ushort)src;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">int</span>)))</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)src;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(uint)))</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                <span class="keywordflow">return</span> (uint)src;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">long</span>)))</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">long</span>)src;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ulong)))</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;                <span class="keywordflow">return</span> (ulong)src;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException();</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        }</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a39827bb6a26b02f3f8837429f9bf99d5">  209</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a39827bb6a26b02f3f8837429f9bf99d5">ConvertULong</a>(ulong src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)))</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#aff70f05d47e6a02f35170943753aeb78">FromULong</a>(src, <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)))</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#abdc1472bc5585705640514094aa1c380">FromBigInt</a>(<span class="keyword">new</span> System.Numerics.BigInteger(src), UFix.GetFormat(dstType).IntWidth);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)))</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a32819868575fcb5fa1abe4464650cb59">FromUnsigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#aff70f05d47e6a02f35170943753aeb78">FromULong</a>(src, <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).IntWidth), <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).FracWidth);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                <span class="keywordflow">return</span> ConvertULong(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a85d2e82c0f9265a3f9d12a4cda6a4941">  229</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a85d2e82c0f9265a3f9d12a4cda6a4941">ConvertSigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a> src, Type dstType)</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">double</span>)))</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#af3667451cdb9829237ed5c778ead1fb6">FromSigned</a>(src, 0).DoubleValue;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                <span class="keywordflow">return</span> ConvertValue(src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a1d10d617afb7d5b9d062288b5277040f">LongValue</a>, dstType);</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#af35bc7f674261294d22778c5296f02ac">  246</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#af35bc7f674261294d22778c5296f02ac">ConvertSigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        {</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)))</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8c46e39c195ebee89d5024efe28fd25e">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)))</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#af3667451cdb9829237ed5c778ead1fb6">FromSigned</a>(src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8c46e39c195ebee89d5024efe28fd25e">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).TotalWidth), <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).FracWidth);</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                <span class="keywordflow">return</span> ConvertSigned(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a921a9eb9ef3fb774ee25eb13d3634caa">  264</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a921a9eb9ef3fb774ee25eb13d3634caa">ConvertUnsigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a> src, Type dstType)</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        {</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">double</span>)))</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a32819868575fcb5fa1abe4464650cb59">FromUnsigned</a>(src, 0).DoubleValue;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                <span class="keywordflow">return</span> ConvertValue(src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a4f68c0d01965caa9b4c30d2d7fa2eab0">ULongValue</a>, dstType);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div>
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#acee770fef21eb7ca41b5642c9913f5e0">  281</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#acee770fef21eb7ca41b5642c9913f5e0">ConvertUnsigned</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        {</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)))</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a753c4e128ef28c6025282a71c189754f">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)))</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a32819868575fcb5fa1abe4464650cb59">FromUnsigned</a>(src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a753c4e128ef28c6025282a71c189754f">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).TotalWidth), <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).FracWidth);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                <span class="keywordflow">return</span> ConvertUnsigned(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        }</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a4080c3194260bf051878967bcbe5305d">  299</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a4080c3194260bf051878967bcbe5305d">ConvertSFix</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a> src, Type dstType)</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        {</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">double</span>)))</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#adfee6cf98608ddb4c77cac2ec301ebf5">DoubleValue</a>;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(sbyte)))</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;                <span class="keywordflow">return</span> (sbyte)src.Resize(8, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(byte)))</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;                <span class="keywordflow">return</span> (byte)src.UFixValue.Resize(8, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">short</span>)))</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)src.Resize(16, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(ushort)))</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                <span class="keywordflow">return</span> (byte)src.UFixValue.Resize(16, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">int</span>)))</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)src.Resize(32, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(uint)))</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                <span class="keywordflow">return</span> (uint)src.UFixValue.Resize(32, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">long</span>)))</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a59bfdce492a7e56411afb2585dbb9452">Resize</a>(64, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ulong)))</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a565889fd7da11fa75545e45af0a946c2">UFixValue</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a99124dfe9d8566749e1dc23d3781eb95">Resize</a>(64, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException();</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a61666a2c6aa07bdfe56625005b818ecd">  332</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a61666a2c6aa07bdfe56625005b818ecd">ConvertSFix</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        {</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)))</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a59bfdce492a7e56411afb2585dbb9452">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).IntWidth, SFix.GetFormat(dstType).FracWidth);</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)))</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#ae5d720e900e7c1ec9925c9eba4881aa8">SignedValue</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8c46e39c195ebee89d5024efe28fd25e">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>)))</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#ab030e2610335ece6dfd99bfbb1628a9f">SLVValue</a>[<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#a6be9a3f726a9f003647cc7a8c77a0af4">GetLength</a>(dstType) - 1, 0];</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                <span class="keywordflow">return</span> ConvertSFix(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        }</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div>
<div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9018bbb6e55c2bc49aec13269aeb2a7b">  352</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9018bbb6e55c2bc49aec13269aeb2a7b">ConvertUFix</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a> src, Type dstType)</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;        {</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;            <span class="keywordflow">if</span> (dstType.Equals(typeof(<span class="keywordtype">double</span>)))</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#aa6af0e3a691229913e2cc8b077dbceee">DoubleValue</a>;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(sbyte)))</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;                <span class="keywordflow">return</span> (sbyte)src.SFixValue.Resize(8, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(byte)))</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;                <span class="keywordflow">return</span> (byte)src.Resize(8, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">short</span>)))</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)src.SFixValue.Resize(16, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(ushort)))</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;                <span class="keywordflow">return</span> (byte)src.Resize(16, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">int</span>)))</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;                <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)src.SFixValue.Resize(32, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(uint)))</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;                <span class="keywordflow">return</span> (uint)src.Resize(32, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;            <span class="keywordflow">else</span> if (dstType.Equals(typeof(<span class="keywordtype">long</span>)))</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a35b5ffb2e0986ffdfcb8fa1112df0ea2">SFixValue</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a59bfdce492a7e56411afb2585dbb9452">Resize</a>(64, 0).SignedValue.LongValue;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.Equals(typeof(ulong)))</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a99124dfe9d8566749e1dc23d3781eb95">Resize</a>(64, 0).UnsignedValue.ULongValue;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException();</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        }</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div>
<div class="line"><a name="l00385"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9471d4fee997153da2dac91f40e13c6b">  385</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9471d4fee997153da2dac91f40e13c6b">ConvertUFix</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        {</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)))</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a99124dfe9d8566749e1dc23d3781eb95">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).IntWidth, UFix.GetFormat(dstType).FracWidth);</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)))</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a8aafa8efb290fba3087697fee0168c37">UnsignedValue</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a753c4e128ef28c6025282a71c189754f">Resize</a>(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">GetFormat</a>(dstType).IntWidth);</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>)))</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;                <span class="keywordflow">return</span> src.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a19c5adcf28cbfb9a4ef40e765d1618a1">SLVValue</a>[<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">StdLogicVector</a>.<a class="code" href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#a6be9a3f726a9f003647cc7a8c77a0af4">GetLength</a>(dstType) - 1, 0];</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;                <span class="keywordflow">return</span> ConvertUFix(src, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        }</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;</div>
<div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a53d0dc861c8b2c7dfff2378a20507ec2">  406</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a53d0dc861c8b2c7dfff2378a20507ec2">ConvertDouble</a>(<span class="keywordtype">double</span> src, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        {</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;            <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)))</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;            {</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;                var fmt = SFix.GetFormat(dstType);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;                <span class="keywordflow">return</span> SFix.FromDouble(src, fmt.IntWidth, fmt.FracWidth);</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;            }</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>.Equals(typeof(<a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)))</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;            {</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;                var fmt = UFix.GetFormat(dstType);</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;                <span class="keywordflow">return</span> UFix.FromDouble(src, fmt.IntWidth, fmt.FracWidth);</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;            }</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;            {</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException();</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;            }</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;        }</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;</div>
<div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a73af19b1598538dd8f256f9fbff60929">  432</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a73af19b1598538dd8f256f9fbff60929">ConvertValue</a>(<span class="keywordtype">object</span> srcValue, Type dstType)</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        {</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(!dstType.IsValueType || srcValue != null, <span class="stringliteral">&quot;srcValue&quot;</span>);</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;            <span class="keywordflow">if</span> (srcValue == null)</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;            <span class="keywordflow">if</span> (dstType.IsPointer || dstType.IsByRef)</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                dstType = dstType.GetElementType();</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;            Type srcType = srcValue.GetType();</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;            <span class="keywordflow">if</span> (srcType.Equals(dstType))</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;                <span class="keywordflow">return</span> srcValue;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;            <span class="keywordflow">if</span> (!dstType.IsPrimitive &amp;&amp; </div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;                !srcType.IsPrimitive &amp;&amp;</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;                dstType.IsAssignableFrom(srcType))</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;                <span class="keywordflow">return</span> srcValue;</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <span class="keywordflow">if</span> (srcValue is <span class="keywordtype">bool</span> ||</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;                srcValue is sbyte ||</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;                srcValue is byte ||</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;                srcValue is <span class="keywordtype">short</span> ||</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;                srcValue is ushort ||</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;                srcValue is <span class="keywordtype">char</span> ||</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;                srcValue is <span class="keywordtype">int</span> ||</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;                srcValue is uint ||</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;                srcValue is <span class="keywordtype">long</span>)</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;            {</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;                <span class="keywordtype">long</span> inter = ToLong(srcValue);</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;                <span class="keywordflow">return</span> ConvertLong(inter, dstType);</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;            }</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is ulong)</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;            {</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;                ulong inter = ToULong(srcValue);</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;                <span class="keywordflow">return</span> ConvertULong(inter, dstType);</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;            }</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;            {</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;                <span class="keywordflow">return</span> ConvertSigned((Signed)srcValue, dstType);</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;            }</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;            {</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;                <span class="keywordflow">return</span> ConvertUnsigned((Unsigned)srcValue, dstType);</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;            }</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;            {</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;                <span class="keywordflow">return</span> ConvertSFix((SFix)srcValue, dstType);</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;            }</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;            {</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;                <span class="keywordflow">return</span> ConvertUFix((UFix)srcValue, dstType);</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;            }</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((srcType.IsGenericType &amp;&amp;</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;                srcType.GetGenericTypeDefinition().Equals(typeof(TaskAwaiter&lt;&gt;)) &amp;&amp;</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;                dstType.Equals(typeof(TaskAwaiter))) ||</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;                (dstType.IsGenericType &amp;&amp;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;                dstType.GetGenericTypeDefinition().Equals(typeof(TaskAwaiter&lt;&gt;)) &amp;&amp;</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;                srcType.Equals(typeof(TaskAwaiter))))</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;            {</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;                <span class="comment">// Thanks, Microsoft... :-/</span></div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;                var sourceAwaiterType = srcValue.GetType();</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;                var sourceAwaiterField = sourceAwaiterType.GetField(<span class="stringliteral">&quot;m_task&quot;</span>, BindingFlags.Instance | BindingFlags.NonPublic);</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;                var task = sourceAwaiterField.GetValue(srcValue);</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;                var targetAwaiter = Activator.CreateInstance(dstType);</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                var targetAwaiterField = dstType.GetField(<span class="stringliteral">&quot;m_task&quot;</span>, BindingFlags.Instance | BindingFlags.NonPublic);</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;                targetAwaiterField.SetValue(targetAwaiter, task);</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;                <span class="keywordflow">return</span> targetAwaiter;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;            }</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;            {</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;                <span class="keywordflow">return</span> Convert.ChangeType(srcValue, dstType);</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;            }</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;        }</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;</div>
<div class="line"><a name="l00517"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a118555968bb168f07c7d23457318b159">  517</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a118555968bb168f07c7d23457318b159">ConvertValue</a>(<span class="keywordtype">object</span> srcValue, <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> dstType)</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;        {</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(dstType != null, <span class="stringliteral">&quot;dstType&quot;</span>);</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(!dstType.CILType.IsValueType || srcValue != null, <span class="stringliteral">&quot;srcValue&quot;</span>);</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;            <span class="keywordflow">if</span> (srcValue == null)</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;            <span class="keywordflow">if</span> (!dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a27a95ad37bf09f44694e304acf9ef650">IsConstrained</a>)</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;                <span class="keywordflow">return</span> ConvertValue(srcValue, dstType.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">CILType</a>);</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a>.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#adb47566120cd2ba4ea2fa81cf527d42b">GetTypeOf</a>(srcValue).Equals(dstType))</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;                <span class="keywordflow">return</span> srcValue;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;            <span class="keywordflow">if</span> (srcValue is <span class="keywordtype">bool</span> ||</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;                srcValue is sbyte ||</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;                srcValue is byte ||</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;                srcValue is <span class="keywordtype">short</span> ||</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                srcValue is ushort ||</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;                srcValue is <span class="keywordtype">char</span> ||</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;                srcValue is <span class="keywordtype">int</span> ||</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;                srcValue is uint ||</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;                srcValue is <span class="keywordtype">long</span>)</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;            {</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;                <span class="keywordtype">long</span> inter = ToLong(srcValue);</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;                <span class="keywordflow">return</span> ConvertLong(inter, dstType);</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;            }</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is ulong)</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;            {</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;                ulong inter = ToULong(srcValue);</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;                <span class="keywordflow">return</span> ConvertULong(inter, dstType);</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;            }</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <span class="keywordtype">double</span>)</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;            {</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;                <span class="keywordflow">return</span> ConvertDouble((<span class="keywordtype">double</span>)srcValue, dstType);</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;            }</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <span class="keywordtype">float</span>)</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;            {</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;                <span class="keywordflow">return</span> ConvertDouble((<span class="keywordtype">float</span>)srcValue, dstType);</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;            }</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_signed.html">Signed</a>)</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;            {</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;                <span class="keywordflow">return</span> ConvertSigned((Signed)srcValue, dstType);</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;            }</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">Unsigned</a>)</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;            {</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;                <span class="keywordflow">return</span> ConvertUnsigned((Unsigned)srcValue, dstType);</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;            }</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SFix</a>)</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;            {</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;                <span class="keywordflow">return</span> ConvertSFix((SFix)srcValue, dstType);</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;            }</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (srcValue is <a class="code" href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">UFix</a>)</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;            {</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;                <span class="keywordflow">return</span> ConvertUFix((UFix)srcValue, dstType);</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;            }</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;            {</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotImplementedException();</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;            }</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        }</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div>
<div class="line"><a name="l00588"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#af0413aa989ca135e305c5d8a26596311">  588</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#af0413aa989ca135e305c5d8a26596311">ConvertArgumentsAndInvoke</a>(<span class="keyword">this</span> MethodBase method, <span class="keywordtype">object</span> instance, params <span class="keywordtype">object</span>[] args)</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        {</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(method != null, <span class="stringliteral">&quot;method&quot;</span>);</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(method.IsConstructor || method.IsStatic || instance != null, <span class="stringliteral">&quot;instance&quot;</span>);</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;            Contract.Requires&lt;ArgumentNullException&gt;(args != null, <span class="stringliteral">&quot;args&quot;</span>);</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;            Contract.Requires&lt;ArgumentOutOfRangeException&gt;(args.Length == method.GetParameters().Length, </div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;                <span class="stringliteral">&quot;length of args must match parameter count of method&quot;</span>);</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;            <span class="keywordtype">object</span>[] cargs = <span class="keyword">new</span> <span class="keywordtype">object</span>[args.Length];</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;            ParameterInfo[] pis = method.GetParameters();</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; args.Length; i++)</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;            {</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;                cargs[i] = ConvertValue(args[i], pis[i].ParameterType);</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;            }</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;            <span class="keywordtype">object</span> result;</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;            <span class="keywordflow">if</span> (method is MethodInfo)</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;            {</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;                result = method.Invoke(instance, cargs);</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;            }</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (method is ConstructorInfo)</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;            {</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;                result = Activator.CreateInstance(method.DeclaringType, cargs);</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;            }</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            {</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException();</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;            }</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;            Array.Copy(cargs, args, args.Length);</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;            <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        }</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;</div>
<div class="line"><a name="l00619"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ac96730743b7343a8b51c33bda3cdf615">  619</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ac96730743b7343a8b51c33bda3cdf615">ETypeClass</a></div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        {</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;            Boolean,</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;            SignedIntegral,</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;            UnsignedIntegral,</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;            Float,</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;            Double,</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;            Enum,</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;            Other</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;        }</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;        <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> EnsureTypesMatch(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;        {</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;            <span class="keywordflow">if</span> (!v1.GetType().Equals(v2.GetType()))</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(<span class="stringliteral">&quot;The types of the specified arguments do not match&quot;</span>);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        }</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;</div>
<div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20891d10ee852e383ccacd8a9c645b8b">  641</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20891d10ee852e383ccacd8a9c645b8b">PrimitiveAdd</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;        {</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;            var r = (dynamic)v1 + (dynamic)v2;</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;        }</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;</div>
<div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3d41d5e4afbba7f55c0c515fd1289bc7">  655</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3d41d5e4afbba7f55c0c515fd1289bc7">PrimitiveAnd</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        {</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;            var r = (dynamic)v1 &amp; (dynamic)v2;</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;        }</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;</div>
<div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a92c73a4d8da28797d1231bccd300b0b2">  669</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a92c73a4d8da28797d1231bccd300b0b2">PrimitiveOr</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;        {</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;</div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;            var r = (dynamic)v1 | (dynamic)v2;</div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;        }</div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;</div>
<div class="line"><a name="l00683"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31d6bd52e550357b005565ca9ad994ff">  683</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31d6bd52e550357b005565ca9ad994ff">PrimitiveXor</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;        {</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;            var r = (dynamic)v1 ^ (dynamic)v2;</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;        }</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;</div>
<div class="line"><a name="l00697"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a6074fb26ef0c57db5bdbe0a6fae38ae3">  697</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a6074fb26ef0c57db5bdbe0a6fae38ae3">PrimitiveSub</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;        {</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;            var r = (dynamic)v1 - (dynamic)v2;</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;        }</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;</div>
<div class="line"><a name="l00711"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7627d6c739ae99f25ab35addd5a240aa">  711</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7627d6c739ae99f25ab35addd5a240aa">PrimitiveMul</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;        {</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;</div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 * (dynamic)v2;</div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;        }</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;</div>
<div class="line"><a name="l00726"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a973357edbfa83160a5ac55c3c3b8b1f0">  726</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a973357edbfa83160a5ac55c3c3b8b1f0">PrimitiveDiv</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        {</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;            <span class="keywordflow">try</span></div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;            {</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;                <span class="keywordflow">return</span> (dynamic)v1 / (dynamic)v2;</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;            }</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;            <span class="keywordflow">catch</span> (DivideByZeroException)</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;            {</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;                <span class="keywordflow">return</span> ConvertValue(0, v1.GetType());</div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;            }</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;        }</div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;</div>
<div class="line"><a name="l00748"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae9bf3c55d16cf5aa07eeac08b9795a16">  748</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae9bf3c55d16cf5aa07eeac08b9795a16">PrimitiveRem</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;        {</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;            <span class="keywordflow">try</span></div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;            {</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;                <span class="keywordflow">return</span> (dynamic)v1 % (dynamic)v2;</div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;            }</div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;            <span class="keywordflow">catch</span> (DivideByZeroException)</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;            {</div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;                <span class="keywordflow">return</span> ConvertValue(0, v1.GetType());</div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;            }</div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;        }</div>
<div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;</div>
<div class="line"><a name="l00768"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3e22d6c8f277acf5ff8d5536db3a1a9d">  768</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3e22d6c8f277acf5ff8d5536db3a1a9d">PrimitiveShl</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;        {</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &lt;&lt; (dynamic)v2;</div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;        }</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;</div>
<div class="line"><a name="l00781"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a239a00c66008678f435001b92d0e0dfb">  781</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a239a00c66008678f435001b92d0e0dfb">PrimitiveShr</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;        {</div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;</div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &gt;&gt; (dynamic)v2;</div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;        }</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;</div>
<div class="line"><a name="l00794"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a041c4e892cb69b9e42a8eba71ad7d3d6">  794</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a041c4e892cb69b9e42a8eba71ad7d3d6">PrimitiveLessThan</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;        {</div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;</div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &lt; (dynamic)v2;</div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;        }</div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;</div>
<div class="line"><a name="l00807"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a54807487aa62d118fee4c95c4a7118f5">  807</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a54807487aa62d118fee4c95c4a7118f5">PrimitiveLessThanOrEqual</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;        {</div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;</div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &lt;= (dynamic)v2;</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;        }</div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;</div>
<div class="line"><a name="l00820"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#adb8192c90d430136b468bb70222b4e4d">  820</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#adb8192c90d430136b468bb70222b4e4d">PrimitiveEqual</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;        {</div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 == (dynamic)v2;</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;        }</div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;</div>
<div class="line"><a name="l00833"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a807ddec4f60f13350c92c2d47a0db8a4">  833</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a807ddec4f60f13350c92c2d47a0db8a4">PrimitiveUnequal</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;        {</div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 != (dynamic)v2;</div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;        }</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;</div>
<div class="line"><a name="l00846"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#abee744ec5bcace669878ed22c88e5e31">  846</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#abee744ec5bcace669878ed22c88e5e31">PrimitiveGreaterThanOrEqual</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;        {</div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &gt;= (dynamic)v2;</div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;        }</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;</div>
<div class="line"><a name="l00859"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a05ff4ef7738b0edc23538a899e264373">  859</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a05ff4ef7738b0edc23538a899e264373">PrimitiveGreaterThan</a>(<span class="keywordtype">object</span> v1, <span class="keywordtype">object</span> v2)</div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;        {</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;            <span class="keywordflow">if</span> (v1 == null || v2 == null)</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;</div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;            <span class="keywordflow">return</span> (dynamic)v1 &gt; (dynamic)v2;</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;        }</div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;</div>
<div class="line"><a name="l00872"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20c9b9d8c50e166d19a90d0772513b47">  872</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20c9b9d8c50e166d19a90d0772513b47">PrimitiveNeg</a>(<span class="keywordtype">object</span> v)</div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;        {</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;            <span class="keywordflow">if</span> (v == null)</div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;</div>
<div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;            <span class="keywordflow">return</span> -(dynamic)v;</div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;        }</div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;</div>
<div class="line"><a name="l00885"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a1f5f948a9421321112bbba78e8258730">  885</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">object</span> <a class="code" href="class_system_sharp_1_1_common_1_1_type_conversions.html#a1f5f948a9421321112bbba78e8258730">PrimitiveNot</a>(<span class="keywordtype">object</span> v)</div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;        {</div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;            <span class="keywordflow">if</span> (v == null)</div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;</div>
<div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;            <span class="keywordflow">return</span> !(dynamic)v;</div>
<div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;        }</div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;    }</div>
<div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;}</div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a5eea9d1e5789cf038f95a6ff54fe955b"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a5eea9d1e5789cf038f95a6ff54fe955b">SystemSharp.Common.TypeConversions.ConvertLong</a></div><div class="ttdeci">static object ConvertLong(long src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00113">TypeConversions.cs:113</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_af35bc7f674261294d22778c5296f02ac"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#af35bc7f674261294d22778c5296f02ac">SystemSharp.Common.TypeConversions.ConvertSigned</a></div><div class="ttdeci">static object ConvertSigned(Signed src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00246">TypeConversions.cs:246</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_signed_html_a8948bc0b3b8574c7dff7c8d505dd33f3"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8948bc0b3b8574c7dff7c8d505dd33f3">SystemSharp.DataTypes.Signed.FromLong</a></div><div class="ttdeci">static Signed FromLong(long value, int size)</div><div class="ttdoc">Converts a long value to a Signed value </div><div class="ttdef"><b>Definition:</b> <a href="_signed_8cs_source.html#l00758">Signed.cs:758</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html_adb47566120cd2ba4ea2fa81cf527d42b"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#adb47566120cd2ba4ea2fa81cf527d42b">SystemSharp.Meta.TypeDescriptor.GetTypeOf</a></div><div class="ttdeci">static TypeDescriptor GetTypeOf(object instance)</div><div class="ttdoc">Creates a type descriptor from an instance. </div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00725">TypeDescriptor.cs:725</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_aa6af0e3a691229913e2cc8b077dbceee"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#aa6af0e3a691229913e2cc8b077dbceee">SystemSharp.DataTypes.UFix.DoubleValue</a></div><div class="ttdeci">double DoubleValue</div><div class="ttdoc">Returns the closest double value to this value. This conversion might induce arithmetic overflow or l...</div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00503">UFix.cs:503</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_unsigned_html_a4f68c0d01965caa9b4c30d2d7fa2eab0"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a4f68c0d01965caa9b4c30d2d7fa2eab0">SystemSharp.DataTypes.Unsigned.ULongValue</a></div><div class="ttdeci">ulong ULongValue</div><div class="ttdoc">Converts this value to ulong. If this value is larger than 64 bits, an arithmetic overflow might occu...</div><div class="ttdef"><b>Definition:</b> <a href="_unsigned_8cs_source.html#l00806">Unsigned.cs:806</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html_a27a95ad37bf09f44694e304acf9ef650"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a27a95ad37bf09f44694e304acf9ef650">SystemSharp.Meta.TypeDescriptor.IsConstrained</a></div><div class="ttdeci">bool IsConstrained</div><div class="ttdoc">Returns true if this descriptor describes an array and has type parameters. </div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00339">TypeDescriptor.cs:339</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a0027947f3c5b8e61ba74d77b2aa36abe"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a0027947f3c5b8e61ba74d77b2aa36abe">SystemSharp.DataTypes.UFix.GetFormat</a></div><div class="ttdeci">static FixFormat GetFormat(TypeDescriptor td)</div><div class="ttdoc">Extracts the fixed-point format description from the SysDOM type descriptor, given that it represents...</div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00136">UFix.cs:136</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a9018bbb6e55c2bc49aec13269aeb2a7b"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9018bbb6e55c2bc49aec13269aeb2a7b">SystemSharp.Common.TypeConversions.ConvertUFix</a></div><div class="ttdeci">static object ConvertUFix(UFix src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00352">TypeConversions.cs:352</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a807ddec4f60f13350c92c2d47a0db8a4"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a807ddec4f60f13350c92c2d47a0db8a4">SystemSharp.Common.TypeConversions.PrimitiveUnequal</a></div><div class="ttdeci">static object PrimitiveUnequal(object v1, object v2)</div><div class="ttdoc">Computes &quot;inequality&quot; of v1  and v2  either by primitive operation or by invoking an appropriate oper...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00833">TypeConversions.cs:833</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a85d2e82c0f9265a3f9d12a4cda6a4941"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a85d2e82c0f9265a3f9d12a4cda6a4941">SystemSharp.Common.TypeConversions.ConvertSigned</a></div><div class="ttdeci">static object ConvertSigned(Signed src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00229">TypeConversions.cs:229</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_std_logic_vector_html"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html">SystemSharp.DataTypes.StdLogicVector</a></div><div class="ttdoc">Represents a vector of four-valued logic, similiar to IEEE 1164. </div><div class="ttdef"><b>Definition:</b> <a href="_std_logic_lib_8cs_source.html#l00783">StdLogicLib.cs:783</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_aed9c68252d2494c15c212d7222a6d49f"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#aed9c68252d2494c15c212d7222a6d49f">SystemSharp.DataTypes.SFix.GetFormat</a></div><div class="ttdeci">static FixFormat GetFormat(TypeDescriptor td)</div><div class="ttdoc">Extracts the fixed-point format description from the SysDOM type descriptor, given that it represents...</div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00151">SFix.cs:151</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a73af19b1598538dd8f256f9fbff60929"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a73af19b1598538dd8f256f9fbff60929">SystemSharp.Common.TypeConversions.ConvertValue</a></div><div class="ttdeci">static object ConvertValue(object srcValue, Type dstType)</div><div class="ttdoc">Converts srcValue  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00432">TypeConversions.cs:432</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a54807487aa62d118fee4c95c4a7118f5"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a54807487aa62d118fee4c95c4a7118f5">SystemSharp.Common.TypeConversions.PrimitiveLessThanOrEqual</a></div><div class="ttdeci">static object PrimitiveLessThanOrEqual(object v1, object v2)</div><div class="ttdoc">Computes &quot;less than or equal&quot; of v1  and v2  either by primitive operation or by invoking an appropri...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00807">TypeConversions.cs:807</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_abee744ec5bcace669878ed22c88e5e31"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#abee744ec5bcace669878ed22c88e5e31">SystemSharp.Common.TypeConversions.PrimitiveGreaterThanOrEqual</a></div><div class="ttdeci">static object PrimitiveGreaterThanOrEqual(object v1, object v2)</div><div class="ttdoc">Computes &quot;greater than or equal&quot; of v1  and v2  either by primitive operation or by invoking an appro...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00846">TypeConversions.cs:846</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_a59bfdce492a7e56411afb2585dbb9452"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a59bfdce492a7e56411afb2585dbb9452">SystemSharp.DataTypes.SFix.Resize</a></div><div class="ttdeci">SFix Resize(int newIntWidth, int newFracWidth)</div><div class="ttdoc">Resizes this value to newIntWidth  integer bits and newFracWidth  fractional bits. </div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00736">SFix.cs:736</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_std_logic_vector_html_a6be9a3f726a9f003647cc7a8c77a0af4"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#a6be9a3f726a9f003647cc7a8c77a0af4">SystemSharp.DataTypes.StdLogicVector.GetLength</a></div><div class="ttdeci">static int GetLength(TypeDescriptor type)</div><div class="ttdoc">Returns the length of logic vectors being described type , given that type  actually describes logic ...</div><div class="ttdef"><b>Definition:</b> <a href="_std_logic_lib_8cs_source.html#l01924">StdLogicLib.cs:1924</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a3e22d6c8f277acf5ff8d5536db3a1a9d"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3e22d6c8f277acf5ff8d5536db3a1a9d">SystemSharp.Common.TypeConversions.PrimitiveShl</a></div><div class="ttdeci">static object PrimitiveShl(object v1, object v2)</div><div class="ttdoc">Computes &quot;shift left&quot; of v1  and v2  either by primitive operation or by invoking an appropriate oper...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00768">TypeConversions.cs:768</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_adb8192c90d430136b468bb70222b4e4d"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#adb8192c90d430136b468bb70222b4e4d">SystemSharp.Common.TypeConversions.PrimitiveEqual</a></div><div class="ttdeci">static object PrimitiveEqual(object v1, object v2)</div><div class="ttdoc">Computes &quot;equality&quot; of v1  and v2  either by primitive operation or by invoking an appropriate operat...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00820">TypeConversions.cs:820</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a31d6bd52e550357b005565ca9ad994ff"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31d6bd52e550357b005565ca9ad994ff">SystemSharp.Common.TypeConversions.PrimitiveXor</a></div><div class="ttdeci">static object PrimitiveXor(object v1, object v2)</div><div class="ttdoc">Computes bitwise &quot;xor&quot; of v1  and v2  either by primitive operation or by invoking an appropriate ope...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00683">TypeConversions.cs:683</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a2079e7c2e35681455b8a7bae2718a2d7"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a2079e7c2e35681455b8a7bae2718a2d7">SystemSharp.Common.TypeConversions.ConvertToEnum</a></div><div class="ttdeci">static object ConvertToEnum(long src, Type dstType)</div><div class="ttdoc">Converts src  to the enumeration literal of dstType  whose ordinal number is src . Values being a combination of multiple literals of a [Flag] enum are NOT supported. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00083">TypeConversions.cs:83</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_af3667451cdb9829237ed5c778ead1fb6"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#af3667451cdb9829237ed5c778ead1fb6">SystemSharp.DataTypes.SFix.FromSigned</a></div><div class="ttdeci">static SFix FromSigned(Signed value, int fracWidth)</div><div class="ttdoc">Re-interprets value  as a fixed-point-number with fracWidth  fractional bits. I.e. the binary two&#39;s complement representation of value is re-interpreted. E.g. we get that SFix.FromSigned(Signed.FromLong(3, 3)).DoubleValue == 1.5. </div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00577">SFix.cs:577</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_ac96730743b7343a8b51c33bda3cdf615"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#ac96730743b7343a8b51c33bda3cdf615">SystemSharp.Common.TypeConversions.ETypeClass</a></div><div class="ttdeci">ETypeClass</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00619">TypeConversions.cs:619</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a921a9eb9ef3fb774ee25eb13d3634caa"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a921a9eb9ef3fb774ee25eb13d3634caa">SystemSharp.Common.TypeConversions.ConvertUnsigned</a></div><div class="ttdeci">static object ConvertUnsigned(Unsigned src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00264">TypeConversions.cs:264</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_ae9bf3c55d16cf5aa07eeac08b9795a16"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae9bf3c55d16cf5aa07eeac08b9795a16">SystemSharp.Common.TypeConversions.PrimitiveRem</a></div><div class="ttdeci">static object PrimitiveRem(object v1, object v2)</div><div class="ttdoc">Computes the modulus of v1  and v2  either by primitive operation or by invoking an appropriate opera...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00748">TypeConversions.cs:748</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a20891d10ee852e383ccacd8a9c645b8b"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20891d10ee852e383ccacd8a9c645b8b">SystemSharp.Common.TypeConversions.PrimitiveAdd</a></div><div class="ttdeci">static object PrimitiveAdd(object v1, object v2)</div><div class="ttdoc">Adds v1  and v2  either by primitive addition or by invoking an appropriate operator. Returns null if either operand is null. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00641">TypeConversions.cs:641</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a05ff4ef7738b0edc23538a899e264373"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a05ff4ef7738b0edc23538a899e264373">SystemSharp.Common.TypeConversions.PrimitiveGreaterThan</a></div><div class="ttdeci">static object PrimitiveGreaterThan(object v1, object v2)</div><div class="ttdoc">Computes &quot;greater than&quot; of v1  and v2  either by primitive operation or by invoking an appropriate op...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00859">TypeConversions.cs:859</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_acee770fef21eb7ca41b5642c9913f5e0"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#acee770fef21eb7ca41b5642c9913f5e0">SystemSharp.Common.TypeConversions.ConvertUnsigned</a></div><div class="ttdeci">static object ConvertUnsigned(Unsigned src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00281">TypeConversions.cs:281</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a61666a2c6aa07bdfe56625005b818ecd"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a61666a2c6aa07bdfe56625005b818ecd">SystemSharp.Common.TypeConversions.ConvertSFix</a></div><div class="ttdeci">static object ConvertSFix(SFix src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00332">TypeConversions.cs:332</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html">SystemSharp.DataTypes.UFix</a></div><div class="ttdoc">An unsigned fixed-point number </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00116">UFix.cs:116</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_adbf3a2c45456ea98ed2e0c59e9c2319b"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#adbf3a2c45456ea98ed2e0c59e9c2319b">SystemSharp.Common.TypeConversions.ConvertLong</a></div><div class="ttdeci">static object ConvertLong(long src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00156">TypeConversions.cs:156</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a6074fb26ef0c57db5bdbe0a6fae38ae3"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a6074fb26ef0c57db5bdbe0a6fae38ae3">SystemSharp.Common.TypeConversions.PrimitiveSub</a></div><div class="ttdeci">static object PrimitiveSub(object v1, object v2)</div><div class="ttdoc">Subtracts v1  and v2  either by primitive subtraction or by invoking an appropriate operator...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00697">TypeConversions.cs:697</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_adfee6cf98608ddb4c77cac2ec301ebf5"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#adfee6cf98608ddb4c77cac2ec301ebf5">SystemSharp.DataTypes.SFix.DoubleValue</a></div><div class="ttdeci">double DoubleValue</div><div class="ttdoc">Returns the closest double value to this value. This conversion might induce arithmetic overflow or l...</div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00692">SFix.cs:692</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html">SystemSharp.Common.TypeConversions</a></div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00033">TypeConversions.cs:33</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a96f464993cf1d01eb0118ad34a65d266"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a96f464993cf1d01eb0118ad34a65d266">SystemSharp.Common.TypeConversions.ToLong</a></div><div class="ttdeci">static long ToLong(object v)</div><div class="ttdoc">Converts v  to &quot;long&quot; datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00055">TypeConversions.cs:55</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_unsigned_html"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_unsigned.html">SystemSharp.DataTypes.Unsigned</a></div><div class="ttdoc">An unsigned integer </div><div class="ttdef"><b>Definition:</b> <a href="_unsigned_8cs_source.html#l00637">Unsigned.cs:637</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a9471d4fee997153da2dac91f40e13c6b"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a9471d4fee997153da2dac91f40e13c6b">SystemSharp.Common.TypeConversions.ConvertUFix</a></div><div class="ttdeci">static object ConvertUFix(UFix src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00385">TypeConversions.cs:385</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a19c5adcf28cbfb9a4ef40e765d1618a1"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a19c5adcf28cbfb9a4ef40e765d1618a1">SystemSharp.DataTypes.UFix.SLVValue</a></div><div class="ttdeci">StdLogicVector SLVValue</div><div class="ttdoc">Returns the underlying binary representation of this value as logic vector. </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00446">UFix.cs:446</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_ae5d720e900e7c1ec9925c9eba4881aa8"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#ae5d720e900e7c1ec9925c9eba4881aa8">SystemSharp.DataTypes.SFix.SignedValue</a></div><div class="ttdeci">Signed SignedValue</div><div class="ttdoc">Re-interprets this value as signed integer, i.e. the binary two&#39;s complement representation is re-int...</div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00616">SFix.cs:616</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a92c73a4d8da28797d1231bccd300b0b2"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a92c73a4d8da28797d1231bccd300b0b2">SystemSharp.Common.TypeConversions.PrimitiveOr</a></div><div class="ttdeci">static object PrimitiveOr(object v1, object v2)</div><div class="ttdoc">Computes bitwise &quot;or&quot; of v1  and v2  either by primitive operation or by invoking an appropriate oper...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00669">TypeConversions.cs:669</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_signed_html_abdc1472bc5585705640514094aa1c380"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_signed.html#abdc1472bc5585705640514094aa1c380">SystemSharp.DataTypes.Signed.FromBigInt</a></div><div class="ttdeci">static Signed FromBigInt(BigInteger value, int size)</div><div class="ttdoc">Represents value  as Signed value. </div><div class="ttdef"><b>Definition:</b> <a href="_signed_8cs_source.html#l00779">Signed.cs:779</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_unsigned_html_a2f48b59cf83808aa61c850ac6bebb54b"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a2f48b59cf83808aa61c850ac6bebb54b">SystemSharp.DataTypes.Unsigned.FromBigInt</a></div><div class="ttdeci">static Unsigned FromBigInt(BigInteger value, int size)</div><div class="ttdoc">Converts a non-negative BigInteger value to an Unsigned value. </div><div class="ttdef"><b>Definition:</b> <a href="_unsigned_8cs_source.html#l00753">Unsigned.cs:753</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_signed_html"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_signed.html">SystemSharp.DataTypes.Signed</a></div><div class="ttdoc">Signed integer of arbitrary size </div><div class="ttdef"><b>Definition:</b> <a href="_signed_8cs_source.html#l00634">Signed.cs:634</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_std_logic_vector_html_ab2cdf4140e28b36845f79bf7035d7ee9"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_std_logic_vector.html#ab2cdf4140e28b36845f79bf7035d7ee9">SystemSharp.DataTypes.StdLogicVector.FromLong</a></div><div class="ttdeci">static StdLogicVector FromLong(long value, int size)</div><div class="ttdoc">Converts a long value to its two&#39;s complement enconding. </div><div class="ttdef"><b>Definition:</b> <a href="_std_logic_lib_8cs_source.html#l01815">StdLogicLib.cs:1815</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_ab030e2610335ece6dfd99bfbb1628a9f"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#ab030e2610335ece6dfd99bfbb1628a9f">SystemSharp.DataTypes.SFix.SLVValue</a></div><div class="ttdeci">StdLogicVector SLVValue</div><div class="ttdoc">Returns the underlying binary two&#39;s complement representation of this value as logic vector...</div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00625">SFix.cs:625</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a20c9b9d8c50e166d19a90d0772513b47"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a20c9b9d8c50e166d19a90d0772513b47">SystemSharp.Common.TypeConversions.PrimitiveNeg</a></div><div class="ttdeci">static object PrimitiveNeg(object v)</div><div class="ttdoc">Negates v  by primitive operation or by invoking an appropriate operator. Returns null if v  is null...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00872">TypeConversions.cs:872</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a35b5ffb2e0986ffdfcb8fa1112df0ea2"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a35b5ffb2e0986ffdfcb8fa1112df0ea2">SystemSharp.DataTypes.UFix.SFixValue</a></div><div class="ttdeci">SFix SFixValue</div><div class="ttdoc">Converts this number to signed fixed-point format. </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00489">UFix.cs:489</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a32819868575fcb5fa1abe4464650cb59"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a32819868575fcb5fa1abe4464650cb59">SystemSharp.DataTypes.UFix.FromUnsigned</a></div><div class="ttdeci">static UFix FromUnsigned(Unsigned value, int fracWidth)</div><div class="ttdoc">Re-interprets value  as a fixed-point-number with fracWidth  fractional bits. I.e. the binary two&#39;s complement representation of value is re-interpreted. E.g. we get that UFix.FromUnsigned(Unsigned.FromULong(3, 3)).DoubleValue == 1.5. </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00398">UFix.cs:398</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a99124dfe9d8566749e1dc23d3781eb95"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a99124dfe9d8566749e1dc23d3781eb95">SystemSharp.DataTypes.UFix.Resize</a></div><div class="ttdeci">UFix Resize(int newIntWidth, int newFracWidth)</div><div class="ttdoc">Resizes this value to newIntWidth  integer bits and newFracWidth  fractional bits. </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00519">UFix.cs:519</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html">SystemSharp.DataTypes.SFix</a></div><div class="ttdoc">A signed fixed-point number </div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00116">SFix.cs:116</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_unsigned_html_aff70f05d47e6a02f35170943753aeb78"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#aff70f05d47e6a02f35170943753aeb78">SystemSharp.DataTypes.Unsigned.FromULong</a></div><div class="ttdeci">static Unsigned FromULong(ulong value, int size)</div><div class="ttdoc">Converts a ulong value to an Unsigned value. </div><div class="ttdef"><b>Definition:</b> <a href="_unsigned_8cs_source.html#l00726">Unsigned.cs:726</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">SystemSharp.Meta.TypeDescriptor</a></div><div class="ttdoc">Describes a type. </div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00120">TypeDescriptor.cs:120</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a4080c3194260bf051878967bcbe5305d"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a4080c3194260bf051878967bcbe5305d">SystemSharp.Common.TypeConversions.ConvertSFix</a></div><div class="ttdeci">static object ConvertSFix(SFix src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00299">TypeConversions.cs:299</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_unsigned_html_a753c4e128ef28c6025282a71c189754f"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_unsigned.html#a753c4e128ef28c6025282a71c189754f">SystemSharp.DataTypes.Unsigned.Resize</a></div><div class="ttdeci">Unsigned Resize(int newWidth)</div><div class="ttdoc">Resizes this Unsigned value to a desired target width. </div><div class="ttdef"><b>Definition:</b> <a href="_unsigned_8cs_source.html#l00986">Unsigned.cs:986</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a118555968bb168f07c7d23457318b159"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a118555968bb168f07c7d23457318b159">SystemSharp.Common.TypeConversions.ConvertValue</a></div><div class="ttdeci">static object ConvertValue(object srcValue, TypeDescriptor dstType)</div><div class="ttdoc">Converts srcValue  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00517">TypeConversions.cs:517</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a7ed7e6044e799f6117334f820f376e91"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7ed7e6044e799f6117334f820f376e91">SystemSharp.Common.TypeConversions.ToULong</a></div><div class="ttdeci">static ulong ToULong(object v)</div><div class="ttdoc">Converts v  to &quot;ulong&quot; datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00068">TypeConversions.cs:68</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a973357edbfa83160a5ac55c3c3b8b1f0"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a973357edbfa83160a5ac55c3c3b8b1f0">SystemSharp.Common.TypeConversions.PrimitiveDiv</a></div><div class="ttdeci">static object PrimitiveDiv(object v1, object v2)</div><div class="ttdoc">Divides v1  and v2  either by primitive division or by invoking an appropriate operator. Returns null if either operand is null. Returns 0 in the representation of v1 &#39;s type in case of division by zero. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00726">TypeConversions.cs:726</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a31b65e4aa26a131e580684c949503d1f"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a31b65e4aa26a131e580684c949503d1f">SystemSharp.Common.TypeConversions.ConvertULong</a></div><div class="ttdeci">static object ConvertULong(ulong src, Type dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00178">TypeConversions.cs:178</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_u_fix_html_a8aafa8efb290fba3087697fee0168c37"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_u_fix.html#a8aafa8efb290fba3087697fee0168c37">SystemSharp.DataTypes.UFix.UnsignedValue</a></div><div class="ttdeci">Unsigned UnsignedValue</div><div class="ttdoc">Re-interprets this value as unsigned integer, i.e. the binary representation is re-interpreted. E.g. UFix.FromDouble(1.5, 2, 1).UnsignedValue.ULongValue == 3. </div><div class="ttdef"><b>Definition:</b> <a href="_u_fix_8cs_source.html#l00437">UFix.cs:437</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a1f5f948a9421321112bbba78e8258730"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a1f5f948a9421321112bbba78e8258730">SystemSharp.Common.TypeConversions.PrimitiveNot</a></div><div class="ttdeci">static object PrimitiveNot(object v)</div><div class="ttdoc">Computes &quot;logical not&quot; of v  by primitive operation or by invoking an appropriate operator...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00885">TypeConversions.cs:885</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a7627d6c739ae99f25ab35addd5a240aa"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a7627d6c739ae99f25ab35addd5a240aa">SystemSharp.Common.TypeConversions.PrimitiveMul</a></div><div class="ttdeci">static object PrimitiveMul(object v1, object v2)</div><div class="ttdoc">Multiplies v1  and v2  either by primitive multiplaction or by invoking an appropriate operator...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00711">TypeConversions.cs:711</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_signed_html_a1d10d617afb7d5b9d062288b5277040f"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_signed.html#a1d10d617afb7d5b9d062288b5277040f">SystemSharp.DataTypes.Signed.LongValue</a></div><div class="ttdeci">long LongValue</div><div class="ttdoc">Converts this value to its long representation. </div><div class="ttdef"><b>Definition:</b> <a href="_signed_8cs_source.html#l00834">Signed.cs:834</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a39827bb6a26b02f3f8837429f9bf99d5"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a39827bb6a26b02f3f8837429f9bf99d5">SystemSharp.Common.TypeConversions.ConvertULong</a></div><div class="ttdeci">static object ConvertULong(ulong src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00209">TypeConversions.cs:209</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a239a00c66008678f435001b92d0e0dfb"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a239a00c66008678f435001b92d0e0dfb">SystemSharp.Common.TypeConversions.PrimitiveShr</a></div><div class="ttdeci">static object PrimitiveShr(object v1, object v2)</div><div class="ttdoc">Computes &quot;shift right&quot; of v1  and v2  either by primitive operation or by invoking an appropriate ope...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00781">TypeConversions.cs:781</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_af0413aa989ca135e305c5d8a26596311"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#af0413aa989ca135e305c5d8a26596311">SystemSharp.Common.TypeConversions.ConvertArgumentsAndInvoke</a></div><div class="ttdeci">static object ConvertArgumentsAndInvoke(this MethodBase method, object instance, params object[] args)</div><div class="ttdoc">Converts each parameter of args  to the type expected by method  and invokes method  on instance ...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00588">TypeConversions.cs:588</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a3d41d5e4afbba7f55c0c515fd1289bc7"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a3d41d5e4afbba7f55c0c515fd1289bc7">SystemSharp.Common.TypeConversions.PrimitiveAnd</a></div><div class="ttdeci">static object PrimitiveAnd(object v1, object v2)</div><div class="ttdoc">Computes bitwise &quot;and&quot; of v1  and v2  either by primitive operation or by invoking an appropriate ope...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00655">TypeConversions.cs:655</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_signed_html_a8c46e39c195ebee89d5024efe28fd25e"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_signed.html#a8c46e39c195ebee89d5024efe28fd25e">SystemSharp.DataTypes.Signed.Resize</a></div><div class="ttdeci">Signed Resize(int newWidth)</div><div class="ttdoc">Converts this value to a new size. </div><div class="ttdef"><b>Definition:</b> <a href="_signed_8cs_source.html#l00980">Signed.cs:980</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_ae0828f2f0a646f89f0cbc672d875e36a"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#ae0828f2f0a646f89f0cbc672d875e36a">SystemSharp.Common.TypeConversions.ToDouble</a></div><div class="ttdeci">static double ToDouble(object v)</div><div class="ttdoc">Converts v  to IEEE 754 double precision format, possibly with loss of precision or overflow...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00042">TypeConversions.cs:42</a></div></div>
<div class="ttc" id="struct_system_sharp_1_1_data_types_1_1_s_fix_html_a565889fd7da11fa75545e45af0a946c2"><div class="ttname"><a href="struct_system_sharp_1_1_data_types_1_1_s_fix.html#a565889fd7da11fa75545e45af0a946c2">SystemSharp.DataTypes.SFix.UFixValue</a></div><div class="ttdeci">UFix UFixValue</div><div class="ttdoc">Converts this value to an unsigned fixed-point value. The result uses the same number of fractional b...</div><div class="ttdef"><b>Definition:</b> <a href="_s_fix_8cs_source.html#l00681">SFix.cs:681</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html_a0169e7b6aac9da0659a1bb6b7474cfee"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a0169e7b6aac9da0659a1bb6b7474cfee">SystemSharp.Meta.TypeDescriptor.CILType</a></div><div class="ttdeci">Type CILType</div><div class="ttdoc">The underlying CLI type information. </div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00136">TypeDescriptor.cs:136</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a53d0dc861c8b2c7dfff2378a20507ec2"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a53d0dc861c8b2c7dfff2378a20507ec2">SystemSharp.Common.TypeConversions.ConvertDouble</a></div><div class="ttdeci">static object ConvertDouble(double src, TypeDescriptor dstType)</div><div class="ttdoc">Converts src  to dstType  datatype, possibly with loss of precision or overflow. </div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00406">TypeConversions.cs:406</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_common_1_1_type_conversions_html_a041c4e892cb69b9e42a8eba71ad7d3d6"><div class="ttname"><a href="class_system_sharp_1_1_common_1_1_type_conversions.html#a041c4e892cb69b9e42a8eba71ad7d3d6">SystemSharp.Common.TypeConversions.PrimitiveLessThan</a></div><div class="ttdeci">static object PrimitiveLessThan(object v1, object v2)</div><div class="ttdoc">Computes &quot;less than&quot; of v1  and v2  either by primitive operation or by invoking an appropriate opera...</div><div class="ttdef"><b>Definition:</b> <a href="_type_conversions_8cs_source.html#l00794">TypeConversions.cs:794</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bb5e995590685548b7e11478911ee7c3.html">SystemSharp-Google-SVN</a></li><li class="navelem"><a class="el" href="dir_8deefa4467a62b572b52d238d562b104.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_0e5a72156f8560bbc472a395da2569d6.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_9d3c30b4336bd92c64ccf0aeee487ace.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_f9ef7be6a20c8f1b0769610e52f52090.html">Common</a></li><li class="navelem"><a class="el" href="_type_conversions_8cs.html">TypeConversions.cs</a></li>
    <li class="footer">Generated on Thu Dec 26 2013 14:21:44 for SystemSharp by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
